#include <stdio.h>
int CharCount(char str[]);//prototype
int main(void)
{
	char str[1000] = "";
	printf("Please input a string \n");
	gets(str);
	int count = 0;
	count = CharCount(str);
	printf("字符数量为：%d", count);
}

//function define
int CharCount(char str[])
{
	int count = 0;
	int i = 0;
	while (str[i] != '\0')
	{
		count++;
		i++;
	}
	return count;
}
